﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--#include file="utf-8.asp"-->
<!--#include file="conn.asp"-->
<!--#include file="Include.asp"-->

<%
if Request.Cookies("sd-username").HasKeys then
    username = Response.Cookies("sd-username")
else
    username = ""
end if
    
if Request.Cookies("sd-password").HasKeys then
    password = Response.Cookies("sd-password")
else
    password = ""
end if    
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>创意产业园</title>
<link href="images/style.css" rel="stylesheet" type="text/css"/>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="images/js.js" type="text/ecmascript"></script>
</head>
<body>

<div id="all">
    <!--#include file="header.asp"-->
    <div class="Login">
        <div class="Content">
        	<form action="/login_pass.asp" name="logins" id="logins">
		        <input name="username" value="" id="username" class="username">
                <input name="password" value="" type="password" id="password" class="password">
		        <div class="check"><input type="checkbox" name="savepassword"/><span>保存密码</span>
		        </div>
		        <a class="login" href="#" onclick="$('form').submit();"></a>
		        <a class="get_pwd" href="#">忘记密码？</a>
		        <a class="regist" href="regist.asp"></a>
	    	</form>
        </div>
    </div>
    <!--#include file="bottom.asp"-->
</div>
</body>
</html>
<script language="JavaScript" type="text/javascript">
    function addCookie(objName, objValue, objHours) {
        var str = objName + "=" + escape(objValue);
        if (objHours > 0) {
            var date = new Date();
            var ms = objHours * 3600 * 1000;
            date.setTime(date.getTime() + ms);
            str += "; expires=" + date.toGMTString();
        }
        document.cookie = str;
        alert("添加cookie成功");
    }

    function getCookie(objName) {
        var arrStr = document.cookie.split("; ");
        for (var i = 0; i < arrStr.length; i++) {
            var temp = arrStr[i].split("=");
            if (temp[0] == objName) return unescape(temp[1]);
        }
    }

    function delCookie(name) {
        var date = new Date();
        date.setTime(date.getTime() - 10000);
        document.cookie = name + "=a; expires=" + date.toGMTString();
    }
   </script>
   <script language="JavaScript" type="text/javascript">
       $(document).ready(function () {
           $(".username").val(getCookie("sd-username"));
           $(".password").val(getCookie("sd-password"));
       });
    </script>